package com.chanjiedata.changbs.utlis;

import java.util.Calendar;

/**
 * Created by Frank on 2017/6/20.
 */

public class TimeUtils {

    public static String getDateSx() {
        Calendar cal = Calendar.getInstance();
        int hour = cal.get(Calendar.HOUR_OF_DAY);
        if (hour >= 6 && hour < 8) {
            return  "早上好" ;
        } else if (hour >= 8 && hour < 11) {
            return  "上午好" ;
        } else if (hour >= 11 && hour < 13) {
            return  "中午好" ;
        } else if (hour >= 13 && hour < 18) {
            return  "下午好" ;
        } else {
            return  "晚上好" ;
        }
    }
}
